import { request } from '../request'

const url = '/main'
const fetchProfileUrl = url + '/profile'
const changePasswordUrl = url + '/password'
const fetchCompanyStatisticsUrl = url + '/statistics/company'
const fetchIcafeStatisticsUrl = url + '/statistics/icafe'

export function fetchProfile() {
  return request.get({
    url: fetchProfileUrl
  })
}

export function changePassword(data: any) {
  return request.put({
    url: changePasswordUrl,
    data
  })
}

export function fetchCompanyStatistics() {
  return request.get({
    url: fetchCompanyStatisticsUrl
  })
}

export function fetchIcafeStatistics() {
  return request.get({
    url: fetchIcafeStatisticsUrl
  })
}
